package com.mkvld.appietijdenv2.fragments;

import java.net.URLEncoder;

import com.mkvld.appietijdenv2.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;

public class FragInfoViewV9 extends Fragment {
	public static final String ARG_PAGE = "page";
	public static final int COUNT = 2;
	public static final int INFO_CONTRACT = 0;
	public static final int INFO_PAYROLL = 1;
	public static final int INFO_HOLIDAYS = 2;
	
	
	String infoPage;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		infoPage = getArguments().getString(ARG_PAGE);
		
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		WebView v = (WebView) inflater.inflate(R.layout.frag_info, null, false);
		try {
			v.loadUrl("http://at.remcomokveld.nl/info.data.php?page="+URLEncoder.encode(infoPage, "UTF-8"));
		} catch (Exception e) {
			Log.e("FragInfoViewV9", e.getLocalizedMessage());
		}
		return v;
	}
}
